/**
 * 系统管理的相关api
 */
angular.module('imsApp').factory('SystemManager', ['$http','api', 'paramsManager', function ($http,api, paramsManager) {
    var SystemManager = {
        /**
         * 日志列表
         */
        logList: function (params,query) {
            return $http.get(api+'/ims/logs/'+paramsManager.params(params)+paramsManager.query(query)).then(function (result) {
                return result;
            });
        },
        /**
         * 计划索引创建
         */
        createPlan: function () {
            return $http.get(api+'/ims/campaignIndex').then(function (result) {
                return result;
            });
        },
        /**
         * 广告主索引创建
         */
        createAdv: function () {
            return $http.get(api+'/ims/advertiserIndex').then(function (result) {
                return result;
            });
        },
        /**
         * 应用索引创建
         */
        createApp: function () {
            return $http.get(api+'/ims/appIndex').then(function (result) {
                return result;
            });
        },
        /**
         * 渠道主索引创建
         */
        createChannel: function () {
            return $http.get(api+'/ims/channelIndex').then(function (result) {
                return result;
            });
        },
        /**
         * 标签索引创建
         */
        createTag: function () {
            return $http.get(api+'/ims/tagIndex').then(function (result) {
                return result;
            });
        }
        

    };


    return SystemManager;
}]);
